package cn.bdqn.controller;

import cn.bdqn.dto.Dto;
import cn.bdqn.service.ItripHotelRoomService;
import cn.bdqn.vo.ItripHotelRoomReceive;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Api(description = "酒店房间查询")
@Controller
public class ItripHotelRoomController {

    @Resource
    private ItripHotelRoomService itripHotelRoomService;

    /**
     *酒店房间查询
     * @param itripHotelRoomReceive
     * @return
     */
    @ResponseBody
    @ApiOperation(value = "酒店房间条件查询",httpMethod = "post",protocols = "HTTP",produces = "application/json",response = Dto.class)
    @RequestMapping(value = "/api/hotelroom/queryhotelroombyhotel",method = RequestMethod.POST,produces = "application/json")
    public Dto selectHotelRoom(@ApiParam(name = "itripHotelRoomReceive",value = "酒店房间查询条件")
                                   @RequestBody ItripHotelRoomReceive itripHotelRoomReceive){

        return itripHotelRoomService.selectHotelRoom(itripHotelRoomReceive);
    }

    @ResponseBody
    @ApiOperation(value = "查床型",httpMethod = "get",protocols = "HTTP",produces = "application/json",response = Dto.class)
    @RequestMapping(value = "/api/hotelroom/queryhotelroombed",method = RequestMethod.GET,produces = "application/json")
    public Dto selectBenTypes(){
        return itripHotelRoomService.selectByTypes(new Long(1));
    }

}
